Skip to content

feat(docs): experimental gate for search/ask, positional args, remove chat#457

Merged
JoshMock merged 3 commits into
elastic:mainfrom
Mpdreamz:fix/docs-options
Jul 15, 2026
Merged

feat(docs): experimental gate for search/ask, positional args, remove chat#457
JoshMock merged 3 commits into
elastic:mainfrom
Mpdreamz:fix/docs-options

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove docs chat from the registered command group to reserve the right to remove or redesign multi-turn interaction after assessing real usage post-release. The file is retained but unexposed.
  • Add --accept-experimental flag to docs search and docs ask. Without it, a yellow two-line banner warns the commands are experimental and not yet suited for automation. Motivation: preserve the option to retire or reshape commands (e.g. drop ask after measuring load) without breaking users who relied on them in scripts.
  • Positional args for search, ask, and read so elastic docs search "Query DSL" works naturally alongside the existing --query/--question/--path flag forms.
  • Yellow ANSI colour on the experimental banner when stderr is a TTY; plain text when piped.

cc @elastic/docs-engineering

Demo

docs search demo

Test plan

  • elastic docs search "Query DSL" --size 1 — shows yellow experimental banner, returns results
  • elastic docs search "Query DSL" --size 1 --accept-experimental — no banner
  • elastic docs ask "what is an index?" — shows yellow experimental banner
  • elastic docs read /reference/elasticsearch — no banner (not experimental-gated)
  • elastic docs chat — command not found (removed from group)
  • elastic docs search --query "Query DSL" — flag form still works
  • Piped output (elastic docs search "x" | cat) — banner is plain text, no ANSI codes
  • --json flag — no banner emitted
  • All unit tests pass: npm run test:unit

🤖 Generated with Claude Code

Mpdreamz and others added 2 commits June 23, 2026 21:01
…, add positional args

- Remove `docs chat` from the registered command group (chat.ts retained but
  unexposed) to reserve the right to remove or redesign multi-turn interaction
  after assessing real usage patterns post-release
- Add --accept-experimental flag to `docs search` and `docs ask`; without it
  a yellow two-line banner warns the commands are experimental and not yet
  suited for automation — motivation is to preserve the option to retire or
  reshape them (e.g. drop `ask` after measuring load) without breaking users
  who relied on them in scripts
- Accept the primary argument (query / question / path) as a positional arg so
  `elastic docs search "Query DSL"` works naturally alongside the flag forms
- Yellow ANSI colour on the banner when stderr is a TTY; plain text when piped

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reflects removal of docs chat, --accept-experimental on docs search/ask,
and positional args on docs search/ask/read.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🔍 Preview links for changed docs

⏳ Building and deploying preview... View progress

This comment will be updated with preview links when the build is complete.

@JoshMock JoshMock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice improvement. 👏

@JoshMock

JoshMock commented Jul 6, 2026

Copy link
Copy Markdown
Member

@Mpdreamz all good to me, but tests were failing. Please check any failures after the rerun finishes, clean up, and merge when ready.

@Mpdreamz

Copy link
Copy Markdown
Member Author

@JoshMock I think this is good to merge?

@JoshMock JoshMock merged commit ef2fbdb into elastic:main Jul 15, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants